import axios from "axios"

// Add a request interceptor
axios.interceptors.request.use(function (config) {
    // Do something before request is sent
    return config;
  }, function (error) {
    // Do something with request error
    return Promise.reject(error);
  });

// Add a response interceptor
axios.interceptors.response.use(function (response) {
    // Do something with response data
    return response;
  }, function (error) {
    // Do something with response error
    return Promise.reject(error);
  });


class http {
  
    static get(url,params){
      return  axios.get(url,params)
    }

    static post(url,params){
       return axios.post(url,params)
    }
}


export default http;